<!-- created:2023/2/15 23:18 By AdinZ -->
<template>
  <div class="index">
    <el-drawer v-model="visible" direction="rtl" @close="handlerClose" size="1500px" :with-header="false">

      <OrderSolitaire v-if="formData.type=='SOLITAIRE'" v-model:data="formData"/>
      <OrderSpike v-if="formData.type=='SPIKE'" v-model:data="formData"/>
      <OrderGroup v-if="formData.type=='GROUP'" v-model:data="formData"/>
      <OrderLottery v-if="formData.type=='LOTTERY'||formData.type=='LOTTERY_AD'" v-model:data="formData"/>
      <OrderBargain v-if="formData.type=='BARGAIN'" v-model:data="formData"/>
      <OrderApply v-if="formData.type=='APPLY'" v-model:data="formData"/>
      <OrderCard v-if="formData.type=='CARD'" v-model:data="formData"/>
      <OrderVote v-if="formData.type=='VOTE'" v-model:data="formData"/>
    </el-drawer>
  </div>
</template>

<script>
import OrderSolitaire from "@/views/activity/order/components/OrderSolitaire.vue";
import OrderSpike from "@/views/activity/order/components/OrderSpike.vue";
import OrderLottery from "@/views/activity/order/components/OrderLottery.vue";
import OrderGroup from "@/views/activity/order/components/OrderGroup.vue";
import OrderBargain from "@/views/activity/order/components/OrderBargain.vue";
import OrderApply from "@/views/activity/order/components/OrderApply.vue";
import OrderCard from "@/views/activity/order/components/OrderCard.vue";
import OrderVote from "@/views/activity/order/components/OrderVote.vue";

export default {
  name: "ActivityOrder",
  components: {OrderVote, OrderCard, OrderApply, OrderBargain, OrderGroup, OrderLottery, OrderSpike, OrderSolitaire},
  props: {
    data: {type: Object},
    show: {type: Boolean}
  },
  data() {
    return {
      visible: false
    }
  },
  computed: {
    formData() {
      return this.data;
    }
  },
  watch: {
    show() {
      this.visible = this.show;
    }
  },
  created() {
  },
  methods: {
    handlerClose() {
      this.$emit('update:show', false)
      this.visible = false
      this.$emit('close')
    }
  }
}
</script>

<style scoped lang="scss">
.index {

}
</style>
